package com.xx.happychatboot.serve.message.domain.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;

import io.mybatis.provider.Entity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 会话列表
 * </p>
 *
 * @author xiaoXuan
 * @since 2025-01-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Entity.Table("contact")
public class Contact implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @Entity.Column(id = true, remark = "主键", updatable = false, insertable = false)
    private Long id;

    /**
     * uid
     */
    @Entity.Column("uid")
    private Long uid;

    /**
     * 房间id
     */
    @Entity.Column("room_id")
    private Long roomId;

    /**
     * 阅读到的时间
     */
    @Entity.Column("read_time")
    private Date readTime;

    /**
     * 会话内消息最后更新的时间(只有普通会话需要维护，全员会话不需要维护)
     */
    @Entity.Column("active_time")
    private Date activeTime;

    /**
     * 会话最新消息id
     */
    @Entity.Column("last_msg_id")
    private Long lastMsgId;

    /**
     * 创建时间
     */
    @Entity.Column("create_time")
    private Date createTime;

    /**
     * 修改时间
     */
    @Entity.Column("update_time")
    private Date updateTime;


}
